package org.n.shop.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.n.shop.domain.Do.SelectAllShoppingCartDo;
import org.n.shop.domain.Do.SelectShoppingCartByIdsDo;
import org.n.shop.domain.entity.ShoppingCart;

import java.util.List;

@Mapper
public interface ShoppingCartMapper {
    List<SelectAllShoppingCartDo> all(@Param("userId") int userId);
    int del(@Param("shoppingCartIds") int[] shoppingCartIds);
    int updateNumber(ShoppingCart shoppingCart);
    int add(ShoppingCart shoppingCart);

    List<SelectShoppingCartByIdsDo> selectByIds(@Param("ids") int[] ids);

    int updateIds(@Param("ids") int[] ids);

    int size(@Param("userId") int userId);

    int addNumber(ShoppingCart shoppingCart);
}
